Actions can be adaptive or maladaptive. Thus, deciding which action to pursue often has a significant impact on health and well-being. Not surprisingly, therefore, the nervous system has evolved the means to evaluate actions, enhancing the adaptive ones and suppressing the maladaptive ones. But the neural mechanisms underlying action selection are poorly understood. The proposed research addresses this problem in the context of foraging behavior in the nematode C. elegans for two main reasons. First, this widely used model organism offers many unusual experimental advantages including a compact nervous system of only 302 neurons, a complete neuroanatomical wiring diagram, and a wide range of electrophysiological and optophysiological techniques for linking the activity of identified neurons to behaviors. Second, C. elegans foraging presents in simplified form one of the most fundamental issues in action selection, namely the question of how the nervous system associates the value of the outcome of an action with the particular behavior that caused it, without also reinforcing other behaviors at the same time. The findings from these studies are likely to accelerate the analysis of action selection in other organisms, including humans, by revealing simple neural circuits that will serve as road maps for more complex ones.